home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-06 | 1.8 KB | 100 lines | [TEXT/EDIT] |
- // Dialog.h
- // © Copyright 1984 Consulair Corp, All Rights Reserved.
- // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
- // Stanford University, SUMEX project: 1984
- // Requires MacDefs.h, Quickdraw.h Window.h Textedit.h
-
- #ifndef DialogLoaded
-
- #ifndef TextEditLoaded
- #include "textedit.h"
- #endif
-
- #define DialogLoaded
-
- // Dialog Manager Defines
-
- #define userItem 0
- #define ctrlItem 4
-
- // B0-B1: control kind
-
- #define btnCtrl 0
- #define chkCtrl 1
- #define radCtrl 2
- #define resCtrl 3
-
- // And item type
-
- #define statText 8
- #define editText 16
- #define iconItem 32
- #define picItem 64
- #define itemDisable 128
-
- // Standard Button IDs
-
- #define oK 1
- #define cancel 2
-
- // Dialog Manager structures
-
- struct __DR
- {
- WindowRecord window;
- Handle items;
- TEHandle textH;
- short editField;
- short editOpen;
- short aDefItem;
- };
-
- #define DialogRecord struct __DR
- #define DialogPtr WindowPtr
- typedef DialogRecord *DialogPeek;
-
- struct __DT
- {
- Rect boundsRect;
- short procID;
- char visible;
- char filler1;
- char goAwayFlag;
- char filler2;
- long refCon;
- short itemsID;
- Str255 title;
- };
-
- #define DialogTemplate struct __DT
-
- typedef DialogTemplate * DialogTPtr;
- typedef DialogTPtr * DialogTHndl;
-
- struct __AT
- {
- Rect boundsRect;
- short itemsID;
- long stages;
- };
-
- #define AlertTemplate struct __AT
-
- #define boldItem 8
- #define boxDrawn 4
- #define stageShift 4
-
- typedef AlertTemplate * AlertTPtr;
- typedef AlertTPtr * AlertTHndl;
-
- // Functions returning other than integer
-
- #define GetNewDialog (DialogPtr)GetNewDialog
- #define NewDialog (DialogPtr)NewDialog
-
- // old spelling correction
-
- #define DisposDialog(dialogPointer) DisposeDialog(dialogPointer)
-
- #endif
-